package com.example.rocketmq;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

/**
 * Project:spring-boot-rocketmq
 * <p>
 * Title:MessageConsumer.java
 * <p>
 * Description:
 * <p>
 * Copyrigth:Jiang Software LTD.co Copyright (c) 2021
 * <p>
 * 
 * @version 1.0
 * @since 1.8
 * @author jiang
 * @history 2021 jiang create
 */

@Component
@RocketMQMessageListener(topic ="test-topic",consumerGroup="testjiang")
public class MessageConsumer implements RocketMQListener<String> {

	/**
	 * 进行消息的接受处理.
	 * 
	 * @param text
	 */
	@Override
	public void onMessage(String message) {
		System.err.println("【*** 接受消息 ***】" + message);
	}
}